You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is an update to the Hello World contract that is created on stellar contract init to be more simliar to what is in soroban-examples.
Why
After reviewing the Getting Started guide in the docs, I noticed that the contract that we're creating when running stellar contract init is different than what is in soroban-examples and perhaps it would be less confusing for users if these were the same.
We should actually do the other way around: update examples and docs to use Contract. Changing to a generic Contract was the goal for new contracts. The idea is to avoid having a named struct that won't give you any benefit due to how modules work in rust. It's one less thing to do when using stellar contract init; renaming the struct is 100% unnecessary and must be done on different files.
This changed on #1609 after an internal discussion.
We should actually do the other way around: update examples and docs to use Contract. Changing to a generic Contract was the goal for new contracts.
Ah, that makes sense. Thanks for the context! I have a PR over on the docs that updates HelloWorld -> Contract that was just merged so docs should be good. And, I'll close this PR, and will plan to open one on the examples repo as well.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
This is an update to the Hello World contract that is created on
stellar contract initto be more simliar to what is in soroban-examples.Why
After reviewing the Getting Started guide in the docs, I noticed that the contract that we're creating when running
stellar contract initis different than what is in soroban-examples and perhaps it would be less confusing for users if these were the same.Known limitations
Related PR: stellar/stellar-docs#1239